function getSum(a, b, c) {
  return a + b + c;
}

let arr = [1,2,3]
let r = arr.reduce(getSum,1)
console.log(r)